import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/views/Main'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'main',
      component: Main,
      children:[
        {path:'/',name:'home',component:()=>import('@/views/Home')},
        // 动态id
        {path:'/article/:id',name:'article',component:()=>import('@/views/Article'),props:true},
      ]
    },
    {path:'/hero/:id',name:'hero',component:()=>import('@/views/Hero'),props:true}

  ]
})
